package com.redis_with_springboot;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName: SessionIdTestController
 * @Author: ZhangYue26
 * @Description:
 * @Date: 2020-10-24
 */
@Controller
public class SessionIdTestController {

    @ResponseBody
    @RequestMapping(method = RequestMethod.GET, value = "testSessionId")
    public String test(HttpServletRequest request) {
        System.out.println(request.getSession().getId());
        return "Success";
    }
}
